package coyote.wqm.getbean;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author: wangqinmin
 * @date : 2022/11/15
 * @description: 仰天大笑出门去，我辈岂是蓬蒿人
 */
public class CoyoteTest {

	public static void main(String[] args) {
		System.err.println("hello");

		/**
		 *
		 * {@link org.springframework.context.support.AbstractApplicationContext#refresh()}
		 */
		AbstractApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

		Teacher bean = ac.getBean(Teacher.class);
		String name = bean.getName();
		System.err.println(name);
	}
}


class Teacher {

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}